﻿<%@ Control Language="C#" EnableViewState="true" %>
<%@ Register Assembly="Antu.WebControls" Namespace="Antu.WebControls" TagPrefix="CBW" %>
<script type="text/javascript">
    function IfSJCom() {

        var tt = document.getElementById("Checkbox1");
        var t1 = document.getElementById('<%=txtPARENT_ID.ClientID %>');
        if (tt != null && tt != "") {
            if (tt.checked == true) {
                if (t1 != null && t1 != "") {
                    t1.value = "0";
                }
            } else {
                t1.value = "";
            }
        }
    }
    window.onload = function aa() {
        var tt = document.getElementById("Checkbox1");
        var t1 = document.getElementById('<%=txtPARENT_ID.ClientID %>');
        if (t1 != null && t1 != "") {
            if (tt != null && tt != "") {
                if (t1.value == "0") {
                    tt.checked = true;
                } else {
                    tt.checked = false;
                }
            }
        }
    };
</script>
<table id="Table1" width="90%" border="0" class="gridtable">
    <tr>
        <th style="height: 25px">
            设置部门信息
        </th>
    </tr>
    <tr>
        <td style="height: 25px">
            <div class="box_middle" style="height: auto">
                <table width="90%" border="0" cellpadding="0" cellspacing="0" class="box_middle_tab">
                    <tr>
                        <td>
                            部门名称：
                        </td>
                        <td style="width: 253px">
                            <asp:TextBox MaxLength="100" size="23" ID="bmmc" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            <!--部门ID： (添加部门时可不填)-->
                            上级单位：(如果没有下属单位，该处为空)
                        </td>
                        <td style="width: 253px">
                            <asp:DropDownList ID="sjbmlist" runat="server">
                            </asp:DropDownList>
                            <asp:TextBox Width="0px" size="23" ID="bmid" runat="server" Visible="false"></asp:TextBox>
                            <asp:TextBox Width="0px" size="23" ID="sjbm" runat="server" Visible="false"></asp:TextBox>
                            <asp:TextBox ID="orderId" runat="server" size="23" Visible="false" Width="0px"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            排序字段
                        </td>
                        <td>
                            <asp:TextBox ID="OrderBy" runat="server"></asp:TextBox>
                        </td>
                    </tr>
                    <tr>
                        <td>是否为上级单位：</td>
                        <td style="width:253px;">
                            <input id="Checkbox1" type="checkbox" onclick="IfSJCom()" />
                            <div style="display:none;"><asp:TextBox ID="txtPARENT_ID" runat="server"></asp:TextBox></div>
                        </td>
                    </tr>
                    <tr>
                        <td colspan="2">
                            <%--<asp:Button ID="inputdata" class="input" Text="新增部门" runat="server" Visible="false" />--%>
                            <input type="button" value="新增部门" onclick='window.navigate("DepartEdit.aspx?orderId=&depName=&departId=")' />
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:Button ID="editdata" Text="保存" class="input" runat="server" />
                            &nbsp;&nbsp;&nbsp;&nbsp;
                            <asp:Button ID="deldata" Text="删除" class="input" runat="server" />
                        </td>
                        <td>
                        </td>
                    </tr>
                </table>
                <div style="text-align: left; color: Blue;">
                    注：修改部门名称时，如果有上级部门，必须选择上级部门；没有的可不选。在左边部门树中选择需要修改的部门，修改后点保存，如果需要新增，则先点新增状态按钮切换为新增状态，然后录入部门数据点保存便可。
                </div>
            </div>
        </td>
    </tr>
</table>
<table id="Table2" width="90%" border="0" class="gridtable">
    <tr>
        <th style="height: 25px">
            部门人员维护
        </th>
    </tr>
    <tr>
        <td style="height: 25px">
            <div class="box_middle" style="height: auto">
                <table width="90%" border="0" cellpadding="0" cellspacing="0" class="box_middle_tab">
                    <tr>
                        <td style="height: 25px; text-align: left" colspan="2">
                            用户ID/姓名:<asp:TextBox ID="QueCon" runat="server"></asp:TextBox>
                            <asp:Button ID="btnQuery" Text="查询" runat="server" CssClass="input" />
                        </td>
                        <td style="height: 25px" align="left">
                            <asp:Button ID="submit" Text="保存设置" CssClass="input" runat="server">
                            </asp:Button>
                        </td>
                    </tr>
                    <tr>
                        <td>
                            用户ID
                        </td>
                        <td align="left">
                            用户姓名
                        </td>
                        <td>
                            状态
                        </td>
                        
                    </tr>
                    <CBW:MPRepeater ID="MPRepeater1" runat="server">
                        <ItemTemplate>
                            <tr>
                                <td>
                                    <%#Eval("login_name")%>
                                </td>
                                <td>
                                    <%#Eval("user_name")%>
                                </td>
                                <td>
                                    <asp:Label ID="idtib" runat="server" Text='<%#Eval("userid") %>' Visible="false"></asp:Label>
                                    <asp:CheckBox ID="checkselect" runat="server" Checked='<%#(Eval("checked").ToString()=="1") %>' />
                                </td>
                                
                            </tr>
                        </ItemTemplate>
                    </CBW:MPRepeater>
                    
                </table>
            </div>
        </td>
    </tr>
</table>
